/* 基础样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

header {
    background-color: #343a40;
    color: white;
    padding: 1rem 0;
}

header h1 {
    margin: 0;
    font-size: 1.8rem;
}

header a {
    color: white;
    text-decoration: none;
}

nav {
    margin-top: 1rem;
}

nav a {
    color: rgba(255, 255, 255, 0.8);
    margin-right: 1rem;
    text-decoration: none;
}

nav a:hover {
    color: white;
}

footer {
    background-color: #343a40;
    color: white;
    padding: 1.5rem 0;
    margin-top: 2rem;
    text-align: center;
}

/* 文章样式 */
.articles {
    margin-top: 2rem;
}

.article-summary {
    background: white;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.article-summary h3 {
    margin-bottom: 0.5rem;
}

.meta {
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    color: #007bff;
    text-decoration: none;
}

.article-detail {
    background: white;
    padding: 2rem;
    margin: 2rem 0;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.article-detail h1 {
    margin-bottom: 0.5rem;
}

.content {
    margin-top: 2rem;
    line-height: 1.8;
}

.content h2, .content h3, .content h4 {
    margin: 1.5rem 0 1rem;
}

.content p {
    margin-bottom: 1rem;
}

.content ul, .content ol {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.content pre {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    overflow: auto;
    margin-bottom: 1rem;
}

.content code {
    background: #f8f9fa;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
}

/* 管理界面样式 */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.login-form {
    max-width: 400px;
    margin: 2rem auto;
    background: white;
    padding: 2rem;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 1rem;
}

.form-group textarea {
    min-height: 200px;
    resize: vertical;
}

.btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 1rem;
}

.btn:hover {
    background: #0069d9;
}

.btn-secondary {
    background: #6c757d;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-small {
    padding: 0.3rem 0.6rem;
    font-size: 0.875rem;
}

.btn-danger {
    background: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
}

.form-actions {
    margin-top: 1.5rem;
    display: flex;
    gap: 0.5rem;
}

.article-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.article-table th,
.article-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #dee2e6;
}

.article-table th {
    background-color: #f8f9fa;
    font-weight: bold;
}

.article-table tr:hover {
    background-color: rgba(0,0,0,0.02);
}

.published {
    color: #28a745;
}

.draft {
    color: #6c757d;
}

.error {
    color: #dc3545;
    padding: 1rem;
    background: #f8d7da;
    border-radius: 4px;
    margin-bottom: 1rem;
}